package com.pishou.shop;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.pishou.player.R;

import java.util.Timer;
import java.util.TimerTask;

public class GifActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gif);

        ImageView iv_gif = findViewById(R.id.iv_gif);
        Glide.with(this).load(R.drawable.timg).asGif().into(iv_gif);
    }

    @Override
    protected void onResume() {

        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                Intent intent = new Intent(getApplicationContext(),MainActivity.class);
                startActivity(intent);
            }
        };
        timer.schedule(task,2000);
        super.onResume();
    }
}
